﻿using Fozzy.Being;
using Fozzy.Ontology;


using System.Globalization;
using System.Xml;
using System.Xml.Linq;

namespace Fozzy.Gedcom
{
    /// <summary>
    /// One family group. 
    /// </summary>
    [XAlias("SEX")]
    [XLevel(1)]
    public class Gender                             : Fozzy.Being.Gender
    {
        #region Declaration
            private static string                   female                          =  "F"                          ;
            private static string                   male                            =  "M"                          ;
        #endregion

        #region States
            private bool                            Means_Female            { get { return Element.Be(female)                                    ; } }
        #endregion

        #region Properties
            //public override Fozzy.Name              Name                    { get { return new Name(Value == gender.Female ? female : male, base.Name)  ; } }
        #endregion

        #region Constructeur
            public Gender(_Element node)             : base(node)
            {}
            public Gender(gender gender)            : base(gender)
            {}
            public Gender(Being.Gender gender)      : base(gender.Value)
            {}
        #endregion

            //public override void Export(Fozzy.File file)
            //{
            //    base.Export(file)                                   ;
            //}

            //private void ExportGender(Person person)
            //{
            //    WriteLine(1, "SEX", (person.Be_Female) ? "F" : "M");
            //}

            //public override void Export()
            //{
            //    Line.Export()                                                       ;
            //}


            //protected override void Parse()
            //{
            //    //if (string.Compare(value, "f", true, CultureInfo.InvariantCulture) == 0)
            //    //    return gender.Female;
            //    //return gender.Male;
            //    Set(Sex)                                                            ;
            //}
    }
}
